/**
 * 仓库
 */
class DepotPanel extends PanelBase {

	public constructor() {
		super();
		this.skinName = DepotSkin;
	}


	private list: eui.List;



	protected createChildren() {
		super.createChildren();
		// 设置标题
		this.commonPanel.setIcon("btn_depot_png")
		this.commonPanel.setTitle("title_depot_png");

		// 初始化list
		this.list.dataProvider = new eui.ArrayCollection(PlayerSelfData.depot);
		this.list.itemRenderer = DepotItem;

		// type  1 树 2 果实
		Net.ins.send(['warehouse'], {}, (e) => {
			PlayerSelfData.depot = e;
			this.list.dataProvider = new eui.ArrayCollection(e);
		});
	}

}